<template>
  <div>
    <h2>App组件</h2>
    <input type="text" ref="inpVal">
    <button @click="getMsg">点击获取input1值</button>
    <br><br>
    <input type="text" v-model="inpB" >
    <button @click="getinpB">点击获取input2值</button>
    <Count/>
  </div>
</template>

<script>
import Count from "@/components/Count";
export default {
  name:"App",
  data() {
    return {
      inpB:""
    }
  },
  components:{
    Count
  },
  methods: {
    getMsg(){
      console.log(this);
      console.log(this.$refs.inpVal.value);
    },
    getinpB(){
      console.log(this);
      console.log(this.inpB);
    }
  },
}
</script>